//
//  PPAlbumObject.h
//  pickpic
//
//  Created by Jinxiao on 10/3/16.
//  Copyright © 2016 MicroDream. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "PPTimelineCommentObject.h"

#import "PPTimelinePictureObject.h"

@interface PPAlbumObject : NSObject

@property (readwrite, nonatomic, strong) PPUserID userID;

@property (readwrite, nonatomic, strong) NSNumber *albumID;

@property (readwrite, nonatomic, strong) NSString *ownerAvatar;
@property (readwrite, nonatomic, strong) NSString *ownerName;
@property (readwrite, nonatomic, strong) NSString *ownerAccount;

@property (readwrite, nonatomic, strong) NSNumber *permission;

@property (readwrite, nonatomic, strong) NSString *coverKey;
@property (readwrite, nonatomic, strong) NSString *coverHost;

@property (readwrite, nonatomic, strong) NSString *title;
@property (readwrite, nonatomic, strong) NSString *desc;

@property (readwrite, nonatomic, strong) NSNumber *privacy;
@property (readwrite, nonatomic, strong) NSNumber *order;

@property (readwrite, nonatomic, strong) NSDate *createDate;
@property (readwrite, nonatomic, strong) NSDate *updateDate;

@property (readwrite, nonatomic, assign) NSInteger audit;

@property (readwrite, nonatomic, assign) NSInteger like;
@property (readwrite, nonatomic, assign) NSInteger favorite;

@property (readwrite, nonatomic, assign) BOOL isLiked;
@property (readwrite, nonatomic, assign) BOOL isFavorited;

@property (readwrite, nonatomic, assign) NSInteger commentCount;

@property (readwrite, nonatomic, strong) NSArray <PPTimelineCommentObject *> *comments;
@property (readwrite, nonatomic, strong) NSArray <PPTimelinePictureObject *> *pictures;

+ (instancetype)albumForParameters:(NSDictionary *)parameters;

@property (nonatomic, copy) NSString *coverURLString;

@property (readonly) NSString *existingCoverURLString;

- (void)queryCoverImageWithCompletion:(void (^)(UIImage *, NSError *))completion;

@end
